package com.glacier.framework.boot.rest.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.Calendar;
import java.util.Date;

/**
 * date 2023-12-31 17:21
 *
 * @author glacier
 * @version 1.0
 */
@RestController
@RequestMapping("/date")
public class DateController {
    @RequestMapping("/test1")
    public Date test1() {
        return Calendar.getInstance().getTime();
    }

    @RequestMapping("/test2")
    public LocalDate test2() {
        return LocalDate.now();
    }

    @RequestMapping("/test3")
    public LocalDateTime test3() {
        return LocalDateTime.now();
    }

    @RequestMapping("/test4")
    public LocalTime test4() {
        return LocalTime.now();
    }

}
